package sparrow.common;

import java.util.ArrayList;

public class ChatMessage {
	
	private Topic parent = null;
	private String msg;
	private String username;
	private String date;
	private ArrayList<String> tags;
	private int ID;
	
	
	public ChatMessage(String username, String msg, String date, int id, ArrayList<String> tags) {
		this.msg = msg;
		this.date = date;
		this.username = username;
		this.ID = id;
		this.tags = tags;
	}
	
	public void setParent(Topic parent) {
		this.parent = parent;
	}
	
	public ArrayList<String> tags() {
		return tags;
	}
	
	public int id() {
		return ID;
	}
	
	public String toString() {
		return "[" + date + "] " + username + ": " + msg;
	}
	
}
